package com.hyt.it.ogt.kq.service.bm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hyt.it.ogt.kq.service.bm.api.model.PtBmProjectVO;
import com.hyt.it.ogt.kq.service.bm.model.entity.Project;
import com.hyt.it.ogt.kq.service.bm.model.vo.ProjectParam;
import com.hyt.it.ogt.kq.service.bm.model.vo.ProjectStatVo;
import com.hyt.it.ogt.kq.service.bm.model.vo.StudentProjectVo;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 报名项目 Mapper 接口
 * </p>
 *
 * @author wangt
 * @since 2020-05-15
 */
public interface ProjectMapper extends BaseMapper<Project> {

    ProjectStatVo statProjectStudent(@Param("projectId") String projectId, @Param("permissionList") List<String> permissionList, @Param("deptId") String deptId);

    ProjectStatVo statProjectSubject(@Param("projectId") String projectId, @Param("permissionList") List<String> permissionList, @Param("deptId") String deptId);

    Page<ProjectStatVo> queryProject(ProjectParam page);

    long queryProjectCount(@Param("param") ProjectParam param);

    String getBaseTitleColumn(@Param("projectId") String projectId);

    String getTitleColumn(@Param("projectId") String projectId);

    List<ProjectStatVo> queryStudentProject(@Param("officeId") String officeId, @Param("regId") String regId);

    List<ProjectStatVo> queryStudentProjectIgnoreSubject(@Param("officeId") String officeId, @Param("regId") String regId);

    List<ProjectStatVo> queryStudentProjecting(@Param("officeId") String officeId, @Param("regId") String regId, @Param("localDateTime") LocalDateTime nowTime);

    List<ProjectStatVo> queryStudentProjected(@Param("officeId") String officeId, @Param("regId") String regId, @Param("localDateTime") LocalDateTime nowTime);

    List<StudentProjectVo> queryStuProject(@Param("regId") String regId);

    String getCollectIdByProject(@Param("componentName") String componentName, @Param("projectId") String projectId, @Param("delFalg") Integer delFalg);

    String getCollectRequiredByProject(@Param("componentName") String componentName, @Param("projectId") String projectId, @Param("delFalg") Integer delFalg);

    Integer getCollectUploadNumByProject(@Param("photoId") String photoId);

    Integer statStudent(ProjectParam param);

    List<Project> queryExamProject(@Param("officeId") String officeId, @Param("deptIds")  Set<String> deptIds);

    List<Project> getRealOfficeId(@Param("officeId") String officeId);

    List<Project> queryProjectByPage(long current, long size);

    Integer countProjectByPage();

    List<Project> ptQueryProject(@Param("param") PtBmProjectVO param, @Param("currentTime") LocalDateTime currentTime);

    int ptcountProject(@Param("param") PtBmProjectVO param, @Param("currentTime") LocalDateTime currentTime);

    void ptBangProject(@Param("ids") List<String> ids, @Param("bangFlag") Integer bangFlag);

    Project getProjectById(@Param("id") String id);
}
